package cn.com.eado.crm.m.db

import androidx.lifecycle.LiveData
import androidx.room.*


@Dao
interface HangYeDao {
    @Insert//(onConflict = OnConflictStrategy.REPLACE)
    fun insert(hangYe: HangYe)

    @Insert//(onConflict = OnConflictStrategy.REPLACE)
    fun insertAll(hangYes: List<HangYe>)

//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    fun replaceAll(provinces: List<HangYe>)

//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    fun replace(client: HangYe)

//    @Delete
//    fun delete(client: HangYe)

//    @Update
//    fun update(client: HangYe)

    @Query("select * from hang_ye")  //查询所有
    fun queryAll(): List<HangYe>?

    @Query("select * from hang_ye where name = :name")  //查询所有
    fun queryWithName(name: String): HangYe?

}